MarkLogic 10 Product Documentation
PUT /manage/v2/meters/labels/{id|name}

Summary

This resource address updates an existing label and returns the ID of the updated label.

URL Parameters
format The format of the posted data. Can be either json (default) or xml. This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body, either application/xml or application/json.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, either application/xml or application/json.

Response

Upon success, MarkLogic Server returns status code 200 (OK).

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage-admin

Usage Notes

The structure of the data in the request body is as follows:

label:label

Example


cat UpdateLabel.xml
==>
  <label xmlns="http://marklogic.com/manage/meters/label">
     <id>3108808182876923314</id>
     <name>update label</name>  
     <event>marker</event>         
     <start_dt>2013-10-08T00:00:00</start_dt>
     <end_dt>2013-10-09T00:00:00</end_dt>
     <text>label text</text>
     <meta><info>more information</info></meta>
   </label>

curl -X PUT --digest -u admin:password \
     -H "Content-type: application/xml" -d @UpdateLabel.xml \
     http://localhost:8002/manage/v2/meters/labels/3108808182876923314

==> Updates the 3108808182876923314 label on MarkLogic Server.
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy